<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        html,body{
            width: 100%;
            height: 600px;
        }
        #box{
            height: 80%;
            width: 80%;
            background: rgba(0, 0, 0, .2);
        }

        #handler{
            display: none;
        }
        .image-box{
            width: 500px;
            height: auto;
        }
        .before{
            position: absolute;
            right: 20px;
            top: 40px;
            width: 320px;
            height: 180px;
            overflow: hidden;
        }
    </style>
</head>
<body>
        <div id="box">
            <div class="fix-text">
                拖拽图片
            </div>
           
        </div>
    
        <div class="before">
    
        </div>
    <div id="handler" >
        <button class="setAspectRatio">比例1：1</button>
        <button class="setAspectRatio">比例2：1</button>
        <button class="setAspectRatio">比例3：2</button>
        <button id="save">保存背景图</button>
    </div>
    
</body>
</html>